package cn.huiyunche.base.service.form;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @FileName: cn.huiyunche.service.base.form
 * @Description: 分供方获取运单请求参数
 * @author: Aaron
 * @date: 2016/12/6 下午2:29
 */
public class SubCWGetForm {

    //起始地和目的地编码
    @NotBlank(message = "编码不能为空")
    private String codes;

    //起始地和目的地名称
    @NotBlank(message = "地区不能为空")
    private String names;

    //线路主键
    @NotNull(message = "线路主键不能为空")
    private Long routeId;

    //出发地编码
    private String orginCode;

    //出发地名称
//    @NotBlank(message = "起始地不能为空")
    private String orginName;

    //目的地编码
    private String destCode;

    //目的地名称
//    @NotBlank(message = "目的地不能为空")
    private String destName;

    //运力
    @Min(value = 1, message = "运单数不能小于1")
//    @Max(value = 30, message = "运单数不能大于30")
    private Integer capacity;

    //预计时间
    @NotNull(message = "预计时间不能为空")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    private Date estimatedTime;

    public String getCodes() {
        return codes;
    }

    public void setCodes(String codes) {
        this.codes = codes;
    }

    public String getNames() {
        return names;
    }

    public void setNames(String names) {
        this.names = names;
    }

    public String getOrginCode() {
        return orginCode;
    }

    public void setOrginCode(String orginCode) {
        this.orginCode = orginCode;
    }

    public String getOrginName() {
        return orginName;
    }

    public void setOrginName(String orginName) {
        this.orginName = orginName;
    }

    public String getDestCode() {
        return destCode;
    }

    public void setDestCode(String destCode) {
        this.destCode = destCode;
    }

    public String getDestName() {
        return destName;
    }

    public void setDestName(String destName) {
        this.destName = destName;
    }

    public Integer getCapacity() {
        return capacity;
    }

    public void setCapacity(Integer capacity) {
        this.capacity = capacity;
    }

    public Date getEstimatedTime() {
        return estimatedTime;
    }

    public void setEstimatedTime(Date estimatedTime) {
        this.estimatedTime = estimatedTime;
    }

    public Long getRouteId() {
        return routeId;
    }

    public void setRouteId(Long routeId) {
        this.routeId = routeId;
    }

    @Override
    public String toString() {
        return "SubCWGetForm{" +
                "codes='" + codes + '\'' +
                ", names='" + names + '\'' +
                ", routeId=" + routeId +
                ", orginCode='" + orginCode + '\'' +
                ", orginName='" + orginName + '\'' +
                ", destCode='" + destCode + '\'' +
                ", destName='" + destName + '\'' +
                ", capacity=" + capacity +
                ", estimatedTime=" + estimatedTime +
                '}';
    }
}
